"use strict";
const express = require('express');
const path = require('path');
const config = require('./config/index')
var app = express();
//var index = require('./dist/mock/index.json')
//var city = require('./dist/mock/city.json')
//var detail = require('./dist/mock/detail.json')
var apiRoutes = express.Router()
apiRoutes.get('./dist/api', (req, res) => {
    res.json({
      // 这里是你的json内容
      errno: 0,
      data: index
    })
  })
app.use(apiRoutes)
app.use(express.static('./dist/'));
var port = process.env.PORT || config.build.port
module.exports=app.listen(port,function(err){
	if(err){
		console.log(err)
	}
	console.log(port)
})
